:root {
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-xxl: 24px;
  
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
}

[data-theme="light"] {
  --color-primary: #3b82f6;
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
  --color-primary-alpha: rgba(59, 130, 246, 0.1);
  --color-success: #06b6d4;
  --color-warning: #f59e0b;
  --color-error: #dc2626;
  --color-error-hover: #b91c1c;
  --color-error-active: #991b1b;
  --color-error-alpha: rgba(220, 38, 38, 0.1);
  
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-bg-hover: #e2e8f0;
  --color-bg-active: #cbd5e1;
  --color-bg-disabled: #f1f5f9;
  
  --color-text-primary: #0f172a;
  --color-text-secondary: #374151;
  --color-text-tertiary: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-disabled: #94a3b8;
  
  --color-border-primary: #e2e8f0;
  --color-border-secondary: #cbd5e1;
  --color-border-focus: #3b82f6;
  --color-border-hover: #cbd5e1;
  
  --color-toolbar-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --color-toolbar-text: rgba(255, 255, 255, 0.95);
  --color-toolbar-icon: rgba(255, 255, 255, 0.8);
  --color-toolbar-icon-hover: rgba(255, 255, 255, 0.95);
  
  --color-editor-bg: #ffffff;
  --color-editor-border: #e2e8f0;
  
  --color-terminal-bg: #ffffff;
  --color-terminal-border: #e2e8f0;
  --color-terminal-header: #f8fafc;
  
  /* 层次化背景色 - 渐进式层次设计 */
  --color-sidebar-bg: #f8fafc;        /* 最浅 - 独立区域 */
  --color-sidebar-border: #e2e8f0;
  --color-filebar-bg: #f1f5f9;        /* 中等 - 过渡区域 */
  --color-filebar-border: #e2e8f0;
}

[data-theme="dark"] {
  --color-primary: #3b82f6;
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
  --color-primary-alpha: rgba(59, 130, 246, 0.15);
  --color-success: #06b6d4;
  --color-warning: #f59e0b;
  --color-error: #f87171;
  --color-error-hover: #ef4444;
  --color-error-active: #dc2626;
  --color-error-alpha: rgba(248, 113, 113, 0.15);
  
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-bg-hover: #475569;
  --color-bg-active: #64748b;
  --color-bg-disabled: #334155;
  
  --color-text-primary: #f8fafc;
  --color-text-secondary: #e2e8f0;
  --color-text-tertiary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-disabled: #64748b;
  
  --color-border-primary: #334155;
  --color-border-secondary: #475569;
  --color-border-focus: #3b82f6;
  --color-border-hover: #64748b;
  
  --color-toolbar-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --color-toolbar-text: rgba(255, 255, 255, 0.95);
  --color-toolbar-icon: rgba(255, 255, 255, 0.7);
  --color-toolbar-icon-hover: rgba(255, 255, 255, 0.9);
  
  --color-editor-bg: #1e293b;
  --color-editor-border: #334155;
  
  --color-terminal-bg: #1e293b;
  --color-terminal-border: #334155;
  --color-terminal-header: #334155;
  
  /* 层次化背景色 - 渐进式层次设计 */
  --color-sidebar-bg: #1e293b;        /* 与编辑器同级 - 独立区域 */
  --color-sidebar-border: #334155;
  --color-filebar-bg: #334155;        /* 比编辑器深一级 - 过渡区域 */
  --color-filebar-border: #475569;
}

:root {
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
}
